<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
<!-- QCtmNavigationSideBar.cpp -->
  <meta name="description" content="导航侧边栏，类似一个ToolBox.">
  <title>QCtmNavigationSideBar Class | QCustomUi 1.19.0</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
    <div class="main">
    <div class="main-rounded">
        <div class="navigationbar">
        <ul>
<li><a href="index.html">QCustomUi 1.19.0</a></li>
<li><a href="qcustomui-module.html" translate="no">QCustomUi</a></li>
<li>QCtmNavigationSideBar</li>
<li id="buildversion">QCustomUi 1.19.0 Reference Documentation</li>
    </ul>
    </div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3 id="toc">Contents</h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#reimplemented-protected-functions">Reimplemented Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title" translate="no">QCtmNavigationSideBar Class</h1>
<!-- $$$QCtmNavigationSideBar-brief -->
<p>导航侧边栏，类似一个ToolBox. <a href="#details">More...</a></p>
<!-- @@@QCtmNavigationSideBar -->
<div class="table"><table class="alignedsummary requisites" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <code translate="no">#include &lt;QCtmNavigationSideBar.h&gt;</code></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="https://doc.qt.io/qt/qwidget.html" translate="no">QWidget</a></td></tr>
</table></div>
<ul>
<li><a href="qctmnavigationsidebar-members.html">List of all members, including inherited members</a></li>
</ul>
<h2 id="public-types">Public Types</h2>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qctmnavigationsidebar.html#ActionPosition-enum" translate="no">ActionPosition</a></b> { Top, Bottom }</td></tr>
</table></div>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn" translate="no"><b><a href="qctmnavigationsidebar.html#iconSize-prop" translate="no">iconSize</a></b> : QSize</li>
</ul>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qctmnavigationsidebar.html#QCtmNavigationSideBar" translate="no">QCtmNavigationSideBar</a></b>(QWidget *<i>parent</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qctmnavigationsidebar.html#dtor.QCtmNavigationSideBar" translate="no">~QCtmNavigationSideBar</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAction *</td><td class="memItemRight bottomAlign"><b><a href="qctmnavigationsidebar.html#actionAt" translate="no">actionAt</a></b>(int <i>index</i>, QCtmNavigationSideBar::ActionPosition <i>pos</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmnavigationsidebar.html#addAction" translate="no">addAction</a></b>(QAction *<i>action</i>, QCtmNavigationSideBar::ActionPosition <i>pos</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAction *</td><td class="memItemRight bottomAlign"><b><a href="qctmnavigationsidebar.html#addAction-1" translate="no">addAction</a></b>(const QIcon &amp;<i>icon</i>, const QString &amp;<i>text</i>, QCtmNavigationSideBar::ActionPosition <i>pos</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qctmnavigationsidebar.html#count" translate="no">count</a></b>(QCtmNavigationSideBar::ActionPosition <i>pos</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QSize &amp;</td><td class="memItemRight bottomAlign"><b><a href="qctmnavigationsidebar.html#iconSize" translate="no">iconSize</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qctmnavigationsidebar.html#indexOf" translate="no">indexOf</a></b>(QAction *<i>action</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmnavigationsidebar.html#insertAction" translate="no">insertAction</a></b>(int <i>index</i>, QAction *<i>action</i>, QCtmNavigationSideBar::ActionPosition <i>pos</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QAction *</td><td class="memItemRight bottomAlign"><b><a href="qctmnavigationsidebar.html#insertAction-1" translate="no">insertAction</a></b>(int <i>index</i>, const QIcon &amp;<i>icon</i>, const QString &amp;<i>text</i>, QCtmNavigationSideBar::ActionPosition <i>pos</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmnavigationsidebar.html#setIconSize" translate="no">setIconSize</a></b>(const QSize &amp;<i>size</i>)</td></tr>
</table></div>
<h2 id="signals">Signals</h2>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmnavigationsidebar.html#iconSizeChanged" translate="no">iconSizeChanged</a></b>(const QSize &amp;<i>size</i>)</td></tr>
</table></div>
<h2 id="reimplemented-protected-functions">Reimplemented Protected Functions</h2>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qctmnavigationsidebar.html#actionEvent" translate="no">actionEvent</a></b>(QActionEvent *<i>event</i>) override</td></tr>
</table></div>
<!-- $$$QCtmNavigationSideBar-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
</div>
<!-- @@@QCtmNavigationSideBar -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$ActionPosition$$$Top$$$Bottom -->
<h3 class="fn" translate="no" id="ActionPosition-enum">enum QCtmNavigationSideBar::<span class="name">ActionPosition</span></h3>
<p>Action的安放位置.</p>
<div class="table"><table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><code translate="no">QCtmNavigationSideBar::Top</code></td><td class="topAlign tblval"><code translate="no">0</code></td><td class="topAlign">Action安放在侧边栏的顶部.</td></tr>
<tr><td class="topAlign"><code translate="no">QCtmNavigationSideBar::Bottom</code></td><td class="topAlign tblval"><code translate="no">1</code></td><td class="topAlign">Action安放在侧边栏的底部.</td></tr>
</table></div>
<!-- @@@ActionPosition -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$iconSize-prop$$$iconSize$$$setIconSizeconstQSize&$$$iconSizeChangedconstQSize& -->
<h3 class="fn" translate="no" id="iconSize-prop"><span class="name">iconSize</span> : <span class="type"><a href="https://doc.qt.io/qt/qsize.html" translate="no">QSize</a></span></h3>
<p>该属性决定侧边栏的图标大小.</p>
<p><b>Access functions:</b></p>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft topAlign rightAlign"> const QSize &amp;</td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qctmnavigationsidebar.html#iconSize" translate="no">iconSize</a></b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qctmnavigationsidebar.html#setIconSize" translate="no">setIconSize</a></b></span>(const QSize &amp;<i>size</i>)</td></tr>
</table></div>
<p><b>Notifier signal:</b></p>
<div class="table"><table class="alignedsummary" translate="no">
<tr><td class="memItemLeft topAlign rightAlign"> void </td><td class="memItemRight bottomAlign"><span class="name"><b><a href="qctmnavigationsidebar.html#iconSizeChanged" translate="no">iconSizeChanged</a></b></span>(const QSize &amp;<i>size</i>)</td></tr>
</table></div>
<!-- @@@iconSize -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QCtmNavigationSideBar[overload1]$$$QCtmNavigationSideBarQWidget* -->
<h3 class="fn" translate="no" id="QCtmNavigationSideBar"><code class="details extra" translate="no">[explicit]</code> QCtmNavigationSideBar::<span class="name">QCtmNavigationSideBar</span>(<span class="type"><a href="https://doc.qt.io/qt/qwidget.html#QWidget" translate="no">QWidget</a></span> *<i>parent</i>)</h3>
<p>构造一个父窗口为 <i translate="no">parent</i> 的导航侧边栏对象.</p>
<!-- @@@QCtmNavigationSideBar -->
<!-- $$$~QCtmNavigationSideBar[overload1]$$$~QCtmNavigationSideBar -->
<h3 class="fn" translate="no" id="dtor.QCtmNavigationSideBar"><code class="details extra" translate="no">[virtual noexcept]</code> QCtmNavigationSideBar::<span class="name">~QCtmNavigationSideBar</span>()</h3>
<p>销毁该侧边栏对象.</p>
<!-- @@@~QCtmNavigationSideBar -->
<!-- $$$actionAt[overload1]$$$actionAtintQCtmNavigationSideBar::ActionPosition -->
<h3 class="fn" translate="no" id="actionAt"><span class="type"><a href="https://doc.qt.io/qt/qaction.html" translate="no">QAction</a></span> *QCtmNavigationSideBar::<span class="name">actionAt</span>(<span class="type">int</span> <i>index</i>, <span class="type"><a href="qctmnavigationsidebar.html#ActionPosition-enum" translate="no">QCtmNavigationSideBar::ActionPosition</a></span> <i>pos</i>) const</h3>
<p>返回位于 <i translate="no">pos</i> <i translate="no">index</i> 的Action.</p>
<p><b>See also </b><a href="qctmnavigationsidebar.html#addAction" translate="no">addAction</a>, <a href="qctmnavigationsidebar.html#insertAction" translate="no">insertAction</a>, and <a href="qctmnavigationsidebar.html#indexOf" translate="no">indexOf</a>.</p>
<!-- @@@actionAt -->
<!-- $$$actionEvent[overload1]$$$actionEventQActionEvent* -->
<h3 class="fn" translate="no" id="actionEvent"><code class="details extra" translate="no">[override virtual protected]</code> <span class="type">void</span> QCtmNavigationSideBar::<span class="name">actionEvent</span>(<span class="type"><a href="https://doc.qt.io/qt/qactionevent.html" translate="no">QActionEvent</a></span> *<i>event</i>)</h3>
<p>Reimplements: <a href="https://doc.qt.io/qt/qwidget.html#actionEvent" translate="no">QWidget::actionEvent</a>(QActionEvent *event).</p>
<!-- @@@actionEvent -->
<!-- $$$addAction[overload1]$$$addActionQAction*QCtmNavigationSideBar::ActionPosition -->
<h3 class="fn" translate="no" id="addAction"><span class="type">void</span> QCtmNavigationSideBar::<span class="name">addAction</span>(<span class="type"><a href="https://doc.qt.io/qt/qaction.html" translate="no">QAction</a></span> *<i>action</i>, <span class="type"><a href="qctmnavigationsidebar.html#ActionPosition-enum" translate="no">QCtmNavigationSideBar::ActionPosition</a></span> <i>pos</i>)</h3>
<p>This function overloads addAction.</p>
<p>重载函数，在侧边栏的 <i translate="no">pos</i> 添加一个 <i translate="no">action</i>.</p>
<p><b>See also </b><a href="https://doc.qt.io/qt/qwidget.html#addAction" translate="no">QWidget::addAction</a>.</p>
<!-- @@@addAction -->
<!-- $$$addAction$$$addActionconstQIcon&constQString&QCtmNavigationSideBar::ActionPosition -->
<h3 class="fn" translate="no" id="addAction-1"><span class="type"><a href="https://doc.qt.io/qt/qaction.html" translate="no">QAction</a></span> *QCtmNavigationSideBar::<span class="name">addAction</span>(const <span class="type"><a href="https://doc.qt.io/qt/qicon.html" translate="no">QIcon</a></span> &amp;<i>icon</i>, const <span class="type"><a href="https://doc.qt.io/qt/qstring.html" translate="no">QString</a></span> &amp;<i>text</i>, <span class="type"><a href="qctmnavigationsidebar.html#ActionPosition-enum" translate="no">QCtmNavigationSideBar::ActionPosition</a></span> <i>pos</i>)</h3>
<p>This function overloads addAction.</p>
<p>重载函数，在侧边栏的 <i translate="no">pos</i> 位置添加一个图标为 <i translate="no">icon</i> 文本为 <i translate="no">text</i> 的Action.</p>
<p><b>See also </b><a href="https://doc.qt.io/qt/qwidget.html#addAction" translate="no">QWidget::addAction</a>.</p>
<!-- @@@addAction -->
<!-- $$$count[overload1]$$$countQCtmNavigationSideBar::ActionPosition -->
<h3 class="fn" translate="no" id="count"><span class="type">int</span> QCtmNavigationSideBar::<span class="name">count</span>(<span class="type"><a href="qctmnavigationsidebar.html#ActionPosition-enum" translate="no">QCtmNavigationSideBar::ActionPosition</a></span> <i>pos</i>) const</h3>
<p>返回 <i translate="no">pos</i> 位置的Action数量.</p>
<p><b>See also </b><a href="qctmnavigationsidebar.html#addAction" translate="no">addAction</a> and <a href="qctmnavigationsidebar.html#insertAction" translate="no">insertAction</a>.</p>
<!-- @@@count -->
<!-- $$$iconSize -->
<h3 class="fn" translate="no" id="iconSize">const <span class="type"><a href="https://doc.qt.io/qt/qsize.html" translate="no">QSize</a></span> &amp;QCtmNavigationSideBar::<span class="name">iconSize</span>() const</h3>
<p>返回Action的图标大小.</p>
<div class="admonition note"><p><b>Note: </b>Getter function for property iconSize. </p>
</div><p><b>See also </b><a href="qctmnavigationsidebar.html#setIconSize" translate="no">setIconSize</a>.</p>
<!-- @@@iconSize -->
<!-- $$$iconSizeChanged -->
<h3 class="fn" translate="no" id="iconSizeChanged"><code class="details extra" translate="no">[signal]</code> <span class="type">void</span> QCtmNavigationSideBar::<span class="name">iconSizeChanged</span>(const <span class="type"><a href="https://doc.qt.io/qt/qsize.html" translate="no">QSize</a></span> &amp;<i>size</i>)</h3>
<p>图标大小 <i translate="no">size</i> 发生改变时发送该信号.</p>
<div class="admonition note"><p><b>Note: </b>Notifier signal for property <a href="qctmnavigationsidebar.html#iconSize" translate="no">iconSize</a>. </p>
</div><!-- @@@iconSizeChanged -->
<!-- $$$indexOf[overload1]$$$indexOfQAction* -->
<h3 class="fn" translate="no" id="indexOf"><span class="type">int</span> QCtmNavigationSideBar::<span class="name">indexOf</span>(<span class="type"><a href="https://doc.qt.io/qt/qaction.html" translate="no">QAction</a></span> *<i>action</i>) const</h3>
<p>返回 <i translate="no">action</i> 的序号.</p>
<p><b>See also </b><a href="qctmnavigationsidebar.html#count" translate="no">count</a> and <a href="qctmnavigationsidebar.html#actionAt" translate="no">actionAt</a>.</p>
<!-- @@@indexOf -->
<!-- $$$insertAction[overload1]$$$insertActionintQAction*QCtmNavigationSideBar::ActionPosition -->
<h3 class="fn" translate="no" id="insertAction"><span class="type">void</span> QCtmNavigationSideBar::<span class="name">insertAction</span>(<span class="type">int</span> <i>index</i>, <span class="type"><a href="https://doc.qt.io/qt/qaction.html" translate="no">QAction</a></span> *<i>action</i>, <span class="type"><a href="qctmnavigationsidebar.html#ActionPosition-enum" translate="no">QCtmNavigationSideBar::ActionPosition</a></span> <i>pos</i>)</h3>
<p>This function overloads insertAction.</p>
<p>重载函数，在 <i translate="no">pos</i> <i translate="no">index</i> 位置插入一个 <i translate="no">action</i>.</p>
<p><b>See also </b><a href="https://doc.qt.io/qt/qwidget.html#insertAction" translate="no">QWidget::insertAction</a>.</p>
<!-- @@@insertAction -->
<!-- $$$insertAction$$$insertActionintconstQIcon&constQString&QCtmNavigationSideBar::ActionPosition -->
<h3 class="fn" translate="no" id="insertAction-1"><span class="type"><a href="https://doc.qt.io/qt/qaction.html" translate="no">QAction</a></span> *QCtmNavigationSideBar::<span class="name">insertAction</span>(<span class="type">int</span> <i>index</i>, const <span class="type"><a href="https://doc.qt.io/qt/qicon.html" translate="no">QIcon</a></span> &amp;<i>icon</i>, const <span class="type"><a href="https://doc.qt.io/qt/qstring.html" translate="no">QString</a></span> &amp;<i>text</i>, <span class="type"><a href="qctmnavigationsidebar.html#ActionPosition-enum" translate="no">QCtmNavigationSideBar::ActionPosition</a></span> <i>pos</i>)</h3>
<p>This function overloads insertAction.</p>
<p>重载函数， 在 <i translate="no">pos</i> <i translate="no">index</i> 位置插入并返回一个图标为 <i translate="no">icon</i> 文本为 <i translate="no">text</i> 的Action.</p>
<p><b>See also </b><a href="https://doc.qt.io/qt/qwidget.html#insertAction" translate="no">QWidget::insertAction</a>.</p>
<!-- @@@insertAction -->
<!-- $$$setIconSize -->
<h3 class="fn" translate="no" id="setIconSize"><span class="type">void</span> QCtmNavigationSideBar::<span class="name">setIconSize</span>(const <span class="type"><a href="https://doc.qt.io/qt/qsize.html" translate="no">QSize</a></span> &amp;<i>size</i>)</h3>
<p>设置Action的图标大小 <i translate="no">size</i>.</p>
<div class="admonition note"><p><b>Note: </b>Setter function for property <a href="qctmnavigationsidebar.html#iconSize" translate="no">iconSize</a>. </p>
</div><p><b>See also </b><a href="qctmnavigationsidebar.html#iconSize" translate="no">iconSize</a>.</p>
<!-- @@@setIconSize -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> QCustomUi
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/> </div>
</body>
</html>
